//
//  QuestionAnswerTableViewCell.m
//  SeaMelonSeeds_Counselor
//
//  Created by 尤振宇 on 2017/7/21.
//  Copyright © 2017年 杨笑. All rights reserved.
//

#import "QuestionAnswerTableViewCell.h"
#import "JHMacros.h"

@implementation QuestionAnswerTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    self.selectionStyle = UITableViewCellSelectionStyleNone;
    
    [self.contentView addSubview:self.questionAnswerView];
    [self.questionAnswerView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.contentView);
        make.leading.equalTo(self.contentView);
        make.trailing.equalTo(self.contentView);
    }];
    
    [self.replyBtn roundedCorners:3];
    [self.replyBtn borderWidthAndColor:[self.replyBtn titleColorForState:(UIControlStateNormal)]];

    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (IBAction)reply:(id)sender {
    if (self.replyAction) {
        self.replyAction(sender);
    }
}

-(QuestionAnswerView *)questionAnswerView
{
    if (!_questionAnswerView) {
        _questionAnswerView = [[QuestionAnswerView alloc]init];
    }
    return _questionAnswerView;
}

@end
